package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /**
     * 插入所有信息
     * */
    void insert(OrderDetail orderDetail);

    /**
     * 根据orderId查询所有信息
     * */
    @Select("select * from order_detail where order_id = #{OrderId}")
    List<OrderDetail> getByOrderId(Long OrderId);

    @Delete("delete from order_detail where order_id = #{OrderId}")
    void deleteByOrderId(Long id);


}
